<%-- 
    Document   : modificarContratoLaboral
    Created on : 27-ago-2009, 20:43:35
    Author     : Ale
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" session="false" import="domain.*, planner.*, java.util.Iterator, java.util.Set, java.util.List, java.sql.Date"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>DOMECO</title>
        <link href="style.css" rel="stylesheet" type="text/css">


    </head>
    <body>
        
        <%if (request.getSession(false) != null) {%>
        <table align="center" width="1000" >
            <tr>
                <td>
                    <div id="menu" align="center"><jsp:include page="./menu principal.jsp"></jsp:include></div>
                    <br>

                    <p id="campoAzul" align="center" valign="middle" width="235px"><span id="blanco">Contrato laboral</span><br></p>
                    <span id="azulTitulo"> Modificar Contrato Laboral</span>
                    <div id="general">


                        <div id="cuenta" align="right" >

                            <form name="introducirCuenta" action="./Updater?type=wCont&redir=C&idC=<%=request.getParameter("idWContract")%>" method="post">
                                <table>
                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Cuenta:</span></td>
                                        <td><select name="bank" id="bank">
                                                <%
                                                Userdom u = (Userdom) request.getSession().getAttribute("user");
                                                Iterator it = new Operations().getBankaccountsList(u).iterator();
                                                String idContWork = request.getParameter("idWContract");
                                                Integer id = Integer.parseInt(idContWork);
                                                Wcontract w = new Operations().getWcontract(id);
                                                while (it.hasNext()) {
                                                    Bankaccount b = (Bankaccount) it.next();

                                                %>
                                                <option  value="<% out.print(b.getIdBank());%>"><% out.print(b.getName());%></option>

                                                <%
    }
                                                %>
                                            </select>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td><br></td>
                                    </tr>
                                    <tr>
                                        <td><span id="azul">Trabajo:</span></td>
                                        <td><input name="workName" type="text" value="<%=w.getWorkName() %>"/></td>
                                    </tr>

                                     <tr>
                                        <td><br></td>
                                    </tr>

                                     <tr>
                                        <td><span id="azul">Salario básico:</span></td>
                                        <td><input name="basicSalary" type="text" value="<%=w.getBasicSalary() %>"/></td>
                                    </tr>

                                     <tr>
                                        <td><br></td>
                                    </tr>



                                    <tr align="center">

                                        <td><input name="aceptar" type="submit" value="" id="aceptar"></td>
                                        <td><input type="button" value="" id="atras" onclick="javascript:history.back();"></td>
                                    </tr>

                                </table>
<br><br><br><br>

                            </form>
                            <br><br>
                            <br><br>
                        </div>






                    </div>

                    <div id="abajo" align="center"><p>&copy;   Domeco &mdash; Proyecto Informático A&ntilde;o 2009 </p></div>
                </td>
            </tr>
        </table>
        <%} else {%>
        <jsp:forward page="./index.jsp"></jsp:forward>
        <%}%>
    </body>
</html>

